package com.learn.thread.executors;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExecutorSample {
    public static void main(String[] args) {
        //执行200次任务，由2个线程去执行
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        for (int i = 0; i < 2000; i++) {
            executorService.execute(new RunTask());
        }
//        executorService.shutdown();
    }
}
